/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/views/layout/Layout'
import i18n from '@/lang/index'

const productRouter = {
  path: '/adminh5/product',
  component: Layout,
  redirect: '/adminh5/product',
  name: 'product',
  meta: {
    title: i18n.t('Products'),
    icon: 'icon'
  },
  children: [
    {
      path: 'product',
      component: () => import('@/views/adminh5/product/product'),
      name: 'product',
      meta: { title: i18n.t('products'), icon: 'list' }
    },
    {
      path: 'tag',
      component: () => import('@/views/adminh5/product/tag'),
      name: 'product-tag',
      meta: { title: i18n.t('Tags'), icon: 'list' }
    },
    {
      path: 'supplements',
      component: () => import('@/views/adminh5/product/supplements'),
      name: 'product-supplements',
      meta: { title: i18n.t('Supplements'), icon: 'list' }
    },
    {
      path: 'ingredients',
      component: () => import('@/views/adminh5/product/ingredients'),
      name: 'product-ingredients',
      meta: { title: i18n.t('Ingredients'), icon: 'list' }
    },
    {
      path: 'benefits',
      component: () => import('@/views/adminh5/product/benefits'),
      name: 'product-benefits',
      meta: { title: i18n.t('Benefits'), icon: 'list' }
    },
    {
      path: 'product-category',
      // component: () => import('@/views/adminh5/product/categoryTree'),
      component: () => import('@/views/adminh5/product/categoryTree'),
      name: 'product-category',
      meta: { title: i18n.t('Categories'), icon: 'list' }
    },
    {
      path: 'product-nutrition',
      // component: () => import('@/views/adminh5/product/categoryTree'),
      component: () => import('@/views/adminh5/product/nutritionTree'),
      name: 'product-nutrition',
      meta: { title: i18n.t('nutrition'), icon: 'list' }
    },
    // {
    //   path: 'product-omc',
    //   component: () => import('@/views/adminh5/product/omc'),
    //   name: 'product-omc',
    //   meta: { title: i18n.t('OrderMenu'), icon: 'list' }
    // },
    {
      path: 'group',
      component: () => import('@/views/adminh5/order/group'),
      name: 'order-group',
      meta: { title: i18n.t('group'), icon: 'list' }
    }
  ]
}
export default productRouter
